#!/bin/bash
#
# Example usage:
# 
#
# WARNING: Do not use this script if there is a custom network configuration
# 

uImage=${1:-"/home/admin/uImage"}
if [[ ${UID} -ne 0 ]]; then
	echo "This script must be run as root!"
	exit 1
fi

if ! mountpoint -q /mnt; then
	mount /dev/mmcblk0p1 /mnt/
    if [ $? ];then
        echo ""
        exit 1
	fi
fi

cp $uImage /mnt

umount /dev/mmcblk0p1